import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/views/login'
import home from '@/views/home'
import welcome from '@/views/welcome/welcome'
import user from '@/views/user/user'

Vue.use(VueRouter)

const router = new VueRouter({
    routes: [{
            path: '/login',
            component: login,
            name: 'login'
        },
        {
            path: '/',
            component: home,
            name: 'home',
            redirect: 'welcome',
            children: [
                {path: 'welcome', component: welcome},
                {path: 'users', component: user},
                
            ]
        }
    ]
})
export default router